Model run by trashe using Apollo 0.4.0 on R 4.5.3 for Linux. Please acknowledge the use of Apollo by citing Hess & Palma (2019) DOI 10.1016/j.jocm.2019.100170 www.ApolloChoiceModelling.com Model name : EM_LC_with_covariates Model description : LC model with class allocation model on Swiss route choice data, EM algorithm Model run at : 2026-11-02 21:44:32 Estimation method : EM algorithm (bfgs) -> Maximum likelihood (bgw) Estimation diagnosis : Relative function convergence (favorable) Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -8.784463 reciprocal of condition number : 5.3251e-05 Number of individuals : 388 Number of rows in database : 3492 Number of modelled outcomes : 3492 Number of cores used : 1 Model without mixing LL(start) : -1755.5 LL (whole model) at equal shares, LL(0) : -2420.47 LL (whole model) at observed shares, LL(C) : -2420.39 LL(final, whole model) : -1558.43 Rho-squared vs equal shares : 0.3561 Adj.Rho-squared vs equal shares : 0.3508 Rho-squared vs observed shares : 0.3561 Adj.Rho-squared vs observed shares : 0.3512 AIC : 3142.85 BIC : 3222.91 LL(0,Class_1) : -2420.47 LL(final,Class_1) : -1777.3 LL(0,Class_2) : -2420.47 LL(final,Class_2) : -2469.1 Estimated parameters : 13 Time taken (hh:mm:ss) : 00:00:15.17 pre-estimation : 00:00:0.63 estimation : 00:00:13.88 post-estimation : 00:00:0.66 Iterations : 36 (EM) & 7 (bgw) Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) asc_1_a -0.08352 0.066017 -1.2652 0.078803 -1.0599 asc_1_b 0.06831 0.105678 0.6464 0.126304 0.5409 asc_2_a 0.00000 NA NA NA NA asc_2_b 0.00000 NA NA NA NA beta_tt_a -0.03677 0.005208 -7.0610 0.008716 -4.2190 beta_tt_b -0.21268 0.024111 -8.8208 0.041444 -5.1318 beta_tc_a -0.04913 0.012938 -3.7977 0.012915 -3.8044 beta_tc_b -0.78414 0.082284 -9.5297 0.110087 -7.1229 beta_hw_a -0.03414 0.003095 -11.0332 0.004842 -7.0519 beta_hw_b -0.05483 0.005360 -10.2309 0.008097 -6.7723 beta_ch_a -0.61080 0.075020 -8.1418 0.107013 -5.7077 beta_ch_b -2.64963 0.212952 -12.4424 0.266799 -9.9312 delta_a -0.21837 0.217989 -1.0017 0.247041 -0.8839 gamma_commute_a -0.47131 0.328566 -1.4344 0.370788 -1.2711 gamma_car_av_a 0.61148 0.282655 2.1633 0.307272 1.9900 delta_b 0.00000 NA NA NA NA gamma_commute_b 0.00000 NA NA NA NA gamma_car_av_b 0.00000 NA NA NA NA Summary of class allocation for model component : Mean prob. Class_1 0.4705 Class_2 0.5295 Overview of choices for MNL model component Class_1: alt1 alt2 Times available 3492.00 3492.00 Times chosen 1734.00 1758.00 Percentage chosen overall 49.66 50.34 Percentage chosen when available 49.66 50.34 Overview of choices for MNL model component Class_2: alt1 alt2 Times available 3492.00 3492.00 Times chosen 1734.00 1758.00 Percentage chosen overall 49.66 50.34 Percentage chosen when available 49.66 50.34 Classical covariance matrix: asc_1_a asc_1_b beta_tt_a beta_tt_b asc_1_a 0.004358 -0.001959 2.313e-06 -2.048e-05 asc_1_b -0.001959 0.011168 3.733e-05 -4.6071e-04 beta_tt_a 2.313e-06 3.733e-05 2.712e-05 -2.280e-05 beta_tt_b -2.048e-05 -4.6071e-04 -2.280e-05 5.8136e-04 beta_tc_a -1.851e-05 4.421e-05 4.971e-05 -1.163e-06 beta_tc_b 4.322e-06 -0.001359 -1.085e-05 0.001776 beta_hw_a 3.965e-07 1.312e-06 4.669e-06 -3.343e-07 beta_hw_b -5.382e-06 -2.610e-05 -4.513e-06 5.101e-05 beta_ch_a -2.295e-05 -6.9304e-04 9.278e-05 5.4916e-04 beta_ch_b -0.001587 2.7346e-04 -2.505e-05 0.003575 delta_a 9.2575e-04 7.7532e-04 -9.729e-05 -0.001896 gamma_commute_a 0.001502 -0.002762 -1.2128e-04 -2.8014e-04 gamma_car_av_a -0.001228 0.001685 -6.403e-05 6.6382e-04 beta_tc_a beta_tc_b beta_hw_a beta_hw_b asc_1_a -1.851e-05 4.322e-06 3.965e-07 -5.382e-06 asc_1_b 4.421e-05 -0.001359 1.312e-06 -2.610e-05 beta_tt_a 4.971e-05 -1.085e-05 4.669e-06 -4.513e-06 beta_tt_b -1.163e-06 0.001776 -3.343e-07 5.101e-05 beta_tc_a 1.6739e-04 4.770e-05 5.193e-06 -1.392e-06 beta_tc_b 4.770e-05 0.006771 2.649e-05 1.3988e-04 beta_hw_a 5.193e-06 2.649e-05 9.577e-06 -5.773e-06 beta_hw_b -1.392e-06 1.3988e-04 -5.773e-06 2.872e-05 beta_ch_a 1.2933e-04 0.002391 9.596e-05 -3.542e-05 beta_ch_b 2.6675e-04 0.010779 -9.966e-06 4.8347e-04 delta_a -3.5185e-04 -0.006984 -7.219e-05 -1.6443e-04 gamma_commute_a -1.5996e-04 -7.9227e-04 -1.4939e-04 1.8116e-04 gamma_car_av_a 2.020e-05 0.001566 -6.817e-05 2.3322e-04 beta_ch_a beta_ch_b delta_a gamma_commute_a asc_1_a -2.295e-05 -0.001587 9.2575e-04 0.001502 asc_1_b -6.9304e-04 2.7346e-04 7.7532e-04 -0.002762 beta_tt_a 9.278e-05 -2.505e-05 -9.729e-05 -1.2128e-04 beta_tt_b 5.4916e-04 0.003575 -0.001896 -2.8014e-04 beta_tc_a 1.2933e-04 2.6675e-04 -3.5185e-04 -1.5996e-04 beta_tc_b 0.002391 0.010779 -0.006984 -7.9227e-04 beta_hw_a 9.596e-05 -9.966e-06 -7.219e-05 -1.4939e-04 beta_hw_b -3.542e-05 4.8347e-04 -1.6443e-04 1.8116e-04 beta_ch_a 0.005628 0.003595 -0.006465 -0.002407 beta_ch_b 0.003595 0.045349 -0.016876 -0.012407 delta_a -0.006465 -0.016876 0.047519 -0.017822 gamma_commute_a -0.002407 -0.012407 -0.017822 0.107956 gamma_car_av_a -5.7045e-04 0.008657 -0.031392 -0.006170 gamma_car_av_a asc_1_a -0.001228 asc_1_b 0.001685 beta_tt_a -6.403e-05 beta_tt_b 6.6382e-04 beta_tc_a 2.020e-05 beta_tc_b 0.001566 beta_hw_a -6.817e-05 beta_hw_b 2.3322e-04 beta_ch_a -5.7045e-04 beta_ch_b 0.008657 delta_a -0.031392 gamma_commute_a -0.006170 gamma_car_av_a 0.079894 Robust covariance matrix: asc_1_a asc_1_b beta_tt_a beta_tt_b asc_1_a 0.006210 -0.003750 -7.345e-05 1.1348e-04 asc_1_b -0.003750 0.015953 2.8209e-04 -0.001957 beta_tt_a -7.345e-05 2.8209e-04 7.597e-05 -1.9651e-04 beta_tt_b 1.1348e-04 -0.001957 -1.9651e-04 0.001718 beta_tc_a -5.959e-05 2.3583e-04 6.944e-05 -1.1441e-04 beta_tc_b 4.0317e-04 -0.005274 -2.9471e-04 0.004000 beta_hw_a -3.579e-05 3.620e-05 1.913e-05 -2.786e-05 beta_hw_b 6.826e-06 -8.771e-05 -3.089e-05 1.2538e-04 beta_ch_a -5.1922e-04 -0.001985 1.4687e-04 0.001320 beta_ch_b -0.004077 0.002394 -7.7998e-04 0.007301 delta_a 0.003200 0.002243 3.4390e-04 -0.004854 gamma_commute_a 0.006201 -0.012453 -9.0038e-04 0.002434 gamma_car_av_a -0.006146 0.007057 -5.5144e-04 0.002316 beta_tc_a beta_tc_b beta_hw_a beta_hw_b asc_1_a -5.959e-05 4.0317e-04 -3.579e-05 6.826e-06 asc_1_b 2.3583e-04 -0.005274 3.620e-05 -8.771e-05 beta_tt_a 6.944e-05 -2.9471e-04 1.913e-05 -3.089e-05 beta_tt_b -1.1441e-04 0.004000 -2.786e-05 1.2538e-04 beta_tc_a 1.6680e-04 -1.8215e-04 1.452e-05 -1.869e-05 beta_tc_b -1.8215e-04 0.012119 4.523e-05 1.3431e-04 beta_hw_a 1.452e-05 4.523e-05 2.344e-05 -2.329e-05 beta_hw_b -1.869e-05 1.3431e-04 -2.329e-05 6.555e-05 beta_ch_a 9.995e-05 0.005690 2.6261e-04 -2.2424e-04 beta_ch_b -1.8509e-04 0.013773 -2.0537e-04 9.7544e-04 delta_a 1.2344e-04 -0.013736 -2.230e-05 -3.7736e-04 gamma_commute_a -9.3938e-04 0.005371 -6.7372e-04 9.6323e-04 gamma_car_av_a -3.6492e-04 0.002705 -4.0432e-04 9.1582e-04 beta_ch_a beta_ch_b delta_a gamma_commute_a asc_1_a -5.1922e-04 -0.004077 0.003200 0.006201 asc_1_b -0.001985 0.002394 0.002243 -0.012453 beta_tt_a 1.4687e-04 -7.7998e-04 3.4390e-04 -9.0038e-04 beta_tt_b 0.001320 0.007301 -0.004854 0.002434 beta_tc_a 9.995e-05 -1.8509e-04 1.2344e-04 -9.3938e-04 beta_tc_b 0.005690 0.013773 -0.013736 0.005371 beta_hw_a 2.6261e-04 -2.0537e-04 -2.230e-05 -6.7372e-04 beta_hw_b -2.2424e-04 9.7544e-04 -3.7736e-04 9.6323e-04 beta_ch_a 0.011452 0.004334 -0.013204 -0.003463 beta_ch_b 0.004334 0.071182 -0.028498 -0.013275 delta_a -0.013204 -0.028498 0.061029 -0.021927 gamma_commute_a -0.003463 -0.013275 -0.021927 0.137484 gamma_car_av_a -0.001815 0.028712 -0.038920 -0.003505 gamma_car_av_a asc_1_a -0.006146 asc_1_b 0.007057 beta_tt_a -5.5144e-04 beta_tt_b 0.002316 beta_tc_a -3.6492e-04 beta_tc_b 0.002705 beta_hw_a -4.0432e-04 beta_hw_b 9.1582e-04 beta_ch_a -0.001815 beta_ch_b 0.028712 delta_a -0.038920 gamma_commute_a -0.003505 gamma_car_av_a 0.094416 Classical correlation matrix: asc_1_a asc_1_b beta_tt_a beta_tt_b asc_1_a 1.000000 -0.280751 0.006727 -0.012865 asc_1_b -0.280751 1.000000 0.067834 -0.180809 beta_tt_a 0.006727 0.067834 1.000000 -0.181571 beta_tt_b -0.012865 -0.180809 -0.181571 1.000000 beta_tc_a -0.021669 0.032337 0.737831 -0.003729 beta_tc_b 7.9568e-04 -0.156324 -0.025326 0.895077 beta_hw_a 0.001941 0.004012 0.289722 -0.004480 beta_hw_b -0.015212 -0.046088 -0.161685 0.394697 beta_ch_a -0.004633 -0.087417 0.237476 0.303596 beta_ch_b -0.112871 0.012151 -0.022590 0.696203 delta_a 0.064328 0.033656 -0.085703 -0.360701 gamma_commute_a 0.069244 -0.079537 -0.070880 -0.035362 gamma_car_av_a -0.065800 0.056402 -0.043497 0.097402 beta_tc_a beta_tc_b beta_hw_a beta_hw_b asc_1_a -0.021669 7.9568e-04 0.001941 -0.01521 asc_1_b 0.032337 -0.15632 0.004012 -0.04609 beta_tt_a 0.737831 -0.02533 0.289722 -0.16169 beta_tt_b -0.003729 0.89508 -0.004480 0.39470 beta_tc_a 1.000000 0.04481 0.129693 -0.02008 beta_tc_b 0.044807 1.00000 0.104037 0.31718 beta_hw_a 0.129693 0.10404 1.000000 -0.34807 beta_hw_b -0.020082 0.31718 -0.348073 1.00000 beta_ch_a 0.133254 0.38731 0.413326 -0.08809 beta_ch_b 0.096819 0.61515 -0.015122 0.42361 delta_a -0.124755 -0.38936 -0.107013 -0.14074 gamma_commute_a -0.037629 -0.02930 -0.146919 0.10288 gamma_car_av_a 0.005524 0.06734 -0.077935 0.15395 beta_ch_a beta_ch_b delta_a gamma_commute_a asc_1_a -0.004633 -0.11287 0.06433 0.06924 asc_1_b -0.087417 0.01215 0.03366 -0.07954 beta_tt_a 0.237476 -0.02259 -0.08570 -0.07088 beta_tt_b 0.303596 0.69620 -0.36070 -0.03536 beta_tc_a 0.133254 0.09682 -0.12476 -0.03763 beta_tc_b 0.387307 0.61515 -0.38936 -0.02930 beta_hw_a 0.413326 -0.01512 -0.10701 -0.14692 beta_hw_b -0.088095 0.42361 -0.14074 0.10288 beta_ch_a 1.000000 0.22502 -0.39535 -0.09765 beta_ch_b 0.225016 1.00000 -0.36355 -0.17732 delta_a -0.395349 -0.36355 1.00000 -0.24882 gamma_commute_a -0.097646 -0.17732 -0.24882 1.00000 gamma_car_av_a -0.026902 0.14382 -0.50948 -0.06644 gamma_car_av_a asc_1_a -0.065800 asc_1_b 0.056402 beta_tt_a -0.043497 beta_tt_b 0.097402 beta_tc_a 0.005524 beta_tc_b 0.067341 beta_hw_a -0.077935 beta_hw_b 0.153953 beta_ch_a -0.026902 beta_ch_b 0.143819 delta_a -0.509481 gamma_commute_a -0.066437 gamma_car_av_a 1.000000 Robust correlation matrix: asc_1_a asc_1_b beta_tt_a beta_tt_b asc_1_a 1.00000 -0.37675 -0.1069 0.03475 asc_1_b -0.37675 1.00000 0.2562 -0.37383 beta_tt_a -0.10694 0.25625 1.0000 -0.54403 beta_tt_b 0.03475 -0.37383 -0.5440 1.00000 beta_tc_a -0.05855 0.14457 0.6169 -0.21375 beta_tc_b 0.04647 -0.37929 -0.3071 0.87662 beta_hw_a -0.09381 0.05920 0.4532 -0.13884 beta_hw_b 0.01070 -0.08577 -0.4378 0.37364 beta_ch_a -0.06157 -0.14682 0.1575 0.29754 beta_ch_b -0.19393 0.07104 -0.3354 0.66028 delta_a 0.16439 0.07187 0.1597 -0.47406 gamma_commute_a 0.21221 -0.26590 -0.2786 0.15840 gamma_car_av_a -0.25381 0.18183 -0.2059 0.18186 beta_tc_a beta_tc_b beta_hw_a beta_hw_b asc_1_a -0.05855 0.04647 -0.09381 0.01070 asc_1_b 0.14457 -0.37929 0.05920 -0.08577 beta_tt_a 0.61690 -0.30715 0.45322 -0.43776 beta_tt_b -0.21375 0.87662 -0.13884 0.37364 beta_tc_a 1.00000 -0.12811 0.23220 -0.17877 beta_tc_b -0.12811 1.00000 0.08485 0.15068 beta_hw_a 0.23220 0.08485 1.00000 -0.59404 beta_hw_b -0.17877 0.15068 -0.59404 1.00000 beta_ch_a 0.07232 0.48299 0.50682 -0.25880 beta_ch_b -0.05372 0.46892 -0.15898 0.45156 delta_a 0.03869 -0.50506 -0.01864 -0.18866 gamma_commute_a -0.19616 0.13158 -0.37526 0.32085 gamma_car_av_a -0.09196 0.07996 -0.27176 0.36812 beta_ch_a beta_ch_b delta_a gamma_commute_a asc_1_a -0.06157 -0.19393 0.16439 0.21221 asc_1_b -0.14682 0.07104 0.07187 -0.26590 beta_tt_a 0.15746 -0.33542 0.15972 -0.27861 beta_tt_b 0.29754 0.66028 -0.47406 0.15840 beta_tc_a 0.07232 -0.05372 0.03869 -0.19616 beta_tc_b 0.48299 0.46892 -0.50506 0.13158 beta_hw_a 0.50682 -0.15898 -0.01864 -0.37526 beta_hw_b -0.25880 0.45156 -0.18866 0.32085 beta_ch_a 1.00000 0.15179 -0.49944 -0.08728 beta_ch_b 0.15179 1.00000 -0.43237 -0.13419 delta_a -0.49944 -0.43237 1.00000 -0.23937 gamma_commute_a -0.08728 -0.13419 -0.23937 1.00000 gamma_car_av_a -0.05521 0.35024 -0.51272 -0.03077 gamma_car_av_a asc_1_a -0.25381 asc_1_b 0.18183 beta_tt_a -0.20591 beta_tt_b 0.18186 beta_tc_a -0.09196 beta_tc_b 0.07996 beta_hw_a -0.27176 beta_hw_b 0.36812 beta_ch_a -0.05521 beta_ch_b 0.35024 delta_a -0.51272 gamma_commute_a -0.03077 gamma_car_av_a 1.00000 Settings and functions used in model definition: apollo_control -------------- Value modelName "EM_LC_with_covariates" modelDescr "LC model with class allocation model on Swiss route choice data, EM algorithm" indivID "ID" noValidation "TRUE" noDiagnostics "TRUE" outputDirectory "output/" debug "FALSE" nCores "1" workInLogs "FALSE" seed "13" mixing "FALSE" HB "FALSE" calculateLLC "TRUE" analyticHessian "FALSE" dropLoopExpansion "FALSE" dropRedefCheck "FALSE" panelData "TRUE" analyticGrad "TRUE" analyticGrad_manualSet "FALSE" overridePanel "FALSE" preventOverridePanel "FALSE" noModification "FALSE" Hessian routines attempted -------------------------- numerical jacobian of LL analytical gradient apollo_lcPars --------------- function (apollo_beta, apollo_inputs) { lcpars = list() lcpars[["asc_1"]] = list(asc_1_a, asc_1_b) lcpars[["asc_2"]] = list(asc_2_a, asc_2_b) lcpars[["beta_tt"]] = list(beta_tt_a, beta_tt_b) lcpars[["beta_tc"]] = list(beta_tc_a, beta_tc_b) lcpars[["beta_hw"]] = list(beta_hw_a, beta_hw_b) lcpars[["beta_ch"]] = list(beta_ch_a, beta_ch_b) V = list() V[["class_a"]] = delta_a + gamma_commute_a * commute + gamma_car_av_a * car_availability V[["class_b"]] = delta_b + gamma_commute_b * commute + gamma_car_av_b * car_availability classAlloc_settings = list(classes = c(class_a = 1, class_b = 2), utilities = V) lcpars[["pi_values"]] = apollo_classAlloc(classAlloc_settings) return(lcpars) } apollo_probabilities ---------------------- function (apollo_beta, apollo_inputs, functionality = "estimate") { apollo_attach(apollo_beta, apollo_inputs) on.exit(apollo_detach(apollo_beta, apollo_inputs)) P = list() mnl_settings = list(alternatives = c(alt1 = 1, alt2 = 2), avail = list(alt1 = 1, alt2 = 1), choiceVar = choice) for (s in 1:length(pi_values)) { V = list() V[["alt1"]] = asc_1[[s]] + beta_tc[[s]] * tc1 + beta_tt[[s]] * tt1 + beta_hw[[s]] * hw1 + beta_ch[[s]] * ch1 V[["alt2"]] = asc_2[[s]] + beta_tc[[s]] * tc2 + beta_tt[[s]] * tt2 + beta_hw[[s]] * hw2 + beta_ch[[s]] * ch2 mnl_settings$utilities = V P[[paste0("Class_", s)]] = apollo_mnl(mnl_settings, functionality) P[[paste0("Class_", s)]] = apollo_panelProd(P[[paste0("Class_", s)]], apollo_inputs, functionality) } lc_settings = list(inClassProb = P, classProb = pi_values) P[["model"]] = apollo_lc(lc_settings, apollo_inputs, functionality) P = apollo_prepareProb(P, apollo_inputs, functionality) return(P) }